function timeout(ms){
    console.log('hello')
    return new Promise((resolve) => {
        setTimeout(resolve, ms)
    })
}

function delay_time(ms) {
    console.log('world')
    return new Promise(function(resolve){
        setTimeout(resolve, ms)
    })
}

async function asyncPrint(value, ms){
    try {
        await timeout(ms)
        await delay_time(ms)
        console.log('I am waiting')
    } catch (err){
        console.log(err)
    }
}
asyncPrint('helloworld', 2000)




